<style type="text/css">
    div.mods ul#menu_vertical li img{
        vertical-align: middle;
        margin-right: 3px;
        padding-left: 5px;
    }
    div.mods ul#menu_vertical li{
        list-style: none;
        background: url(images/menu_trai_body.png) repeat-y;
        height: 33px;
        line-height: 33px;
        color: #fff;
        font-size: 9pt;
        border-bottom: 1px #A5FAA0 dashed;
    }
    div.mods ul#menu_vertical li a{
        color: #FFF;
    }
    div.mods ul#menu_vertical li.end{
        border: none;
        height: 23px;
    }
    div.mods div.end_blocks{
        background: url(images/menu_trai_footer.png) no-repeat;
    }
    div.mods div.end_blocks_nobg{
        background: url(images/menu_phai_footer.png) no-repeat;
        position: relative;
        overflow: auto;
    }
    div.mods ul li a{
        text-decoration: none;
    }
    div.mods ul#menu_vertical li a:hover{
        //background: url(images/hover_love.gif) repeat;
        color: #FFD200;
    }
    #menu_vertical li ul{
        float: left;
    }
    
    #menu_vertical ul{
        list-style: none;
    }
    #menu_vertical a{
        padding-left: 5px;/*(1)*/
        width: 195px;/*(2)*/
    }
    
    #menu_vertical li{
        width: 200px;/*(3)*/         /*(3)=(1)+(2)*/
    }
    #menu_vertical li ul,#menu_vertical li ul a{
        display: block;
    }
    
    /*khi có sự kiện hover thì các liên kết sẽ có màu nền(background)là #FF8000*/
    ul#menu_vertical li a:hover,ul#menu_vertical li ul.sub_first li a:hover,ul#menu_vertical li ul.sub_first li:hover ul.sub_first a:hover{
        color: #FFD200;
    }
    
    ul#menu_vertical li,ul#menu_vertical li ul.sub_first li,ul#menu_vertical li ul.sub_first li ul.sub_second{
        position: relative;   
    }
    ul#menu_vertical li ul.sub_first,ul#menu_vertical li ul.sub_first li ul.sub_second,ul#menu_vertical li ul.sub_first li ul.sub_second li ul.sub_third{
        position: absolute;
        z-index: 1544440;
    }
    
    /*lề trái bằng chiều dài(width) của 1 li, lề trên bằng -chiều cao(height), ẩn các menu con(cấp 1, cấp 2)* ul.sub_first,ul.sub_second,ul.sub_third*/
    ul#menu_vertical li ul.sub_first,
    ul#menu_vertical li ul.sub_first li ul.sub_second,
    ul#menu_vertical li ul.sub_first li ul.sub_second li ul.sub_third{
        margin-left: 200px;/*(5)*/   /*(5)=(3)*/
        margin-top: -34px;/*(6)*/   /*(6)=-(4)*/
        display: none;
        
        border: 1px solid #FFA200;
        -khtml-border-radius: 5px 5px 5px 5px; /* Konqueror */
        -moz-border-radius: 5px 5px 5px 5px; /* Firefox */
        -webkit-border-radius: 5px 5px 5px 5px; /* Safari & Google Chrome */
        border-radius: 5px 5px 5px 5px; /* Opera */
        
        background: #00220B;
    }
    
    /*khi có sự kiện hover thì các menu con(cấp 1, cấp 2) sẽ hiển thị theo dạng khối*/
    ul#menu_vertical li:hover ul.sub_first,ul#menu_vertical li ul.sub_first li:hover ul.sub_second,ul#menu_vertical li ul.sub_first li ul.sub_second li:hover ul.sub_third{
        display: block;
    }
</style>

<script type="text/javascript">
    $(document).ready(function() { 
        $("#menu_vertical li").hover(function(){ 
            $(this).find('ul.sub_first').css({visibility: "visible",display: "none"}).show(250); 
            },function(){ 
            $(this).find('ul.sub_first').css({visibility: "hidden"}); 
        }); 
        $(".sub_first li").hover(function(){ 
            $(this).find('ul.sub_second').css({visibility: "visible",display: "none"}).show(300); 
            },function(){ 
            $(this).find('ul.sub_second').css({visibility: "hidden"}); 
        });
        $(".sub_second li").hover(function(){ 
            $(this).find('ul.sub_third').css({visibility: "visible",display: "none"}).show(300); 
            },function(){ 
            $(this).find('ul.sub_third').css({visibility: "hidden"}); 
        });
    }); 
</script>

<div class="mods">
    <div class="title_tab">
        <img src="images/icon_title/products.png" />
        Sản Phẩm
    </div>
    <div class="blocks">
        <ul id="menu_vertical">
            <?php
                $loaisanpham = new loaisanphambs();
                $ret_loaisanpham = $loaisanpham->getList();
                for($i = 0; $i < ($ret_loaisanpham != false ? count($ret_loaisanpham) : 0); $i++)
				{
					if($i != (count($ret_loaisanpham) - 1))
                    {
                        echo "<li><img src='images/icon_title/arrow.png' /><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&cont=sanpham'>".$ret_loaisanpham[$i]['TenLoaiSanPham']."</a>";
                                $loaisanphamc1 = new loaisanphamc1bs();
                                $loaisanphamc1->MaLoaiSanPham = $ret_loaisanpham[$i]['MaLoaiSanPham'];
                                $ret_loaisanphamc1 = $loaisanphamc1->getList();
                                if($ret_loaisanphamc1 != null)
                                {
                                    echo "<ul class='sub_first'>";
                                    for($j = 0; $j < ($ret_loaisanphamc1 != false ? count($ret_loaisanphamc1) : 0); $j++)
                                    {
                                        echo "<li><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1={$ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1']}&cont=sanpham'>".$ret_loaisanphamc1[$j]['TenLoaiSanPhamCap1']."</a>";
                                                $loaisanphamc2 = new loaisanphamc2bs();
                                                $loaisanphamc2->MaLoaiSanPhamCap1 = $ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1'];
                                                $ret_loaisanphamc2 = $loaisanphamc2->getList();
                                                if($ret_loaisanphamc2 != null)
                                                {
                                                    echo "<ul class='sub_second'>";
                                                    for($k = 0; $k < ($ret_loaisanphamc2 != false ? count($ret_loaisanphamc2) : 0); $k++)
                                                    {
                                                        echo "<li><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1={$ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1']}&kid2={$ret_loaisanphamc2[$k]['MaLoaiSanPhamCap2']}&cont=sanpham'>".$ret_loaisanphamc2[$k]['TenLoaiSanPhamCap2']."</a>";
                                                            $loaisanphamc3 = new loaisanphamc3bs();
                                                            $loaisanphamc3->MaLoaiSanPhamCap2 = $ret_loaisanphamc2[$k]['MaLoaiSanPhamCap2'];
                                                            $ret_loaisanphamc3 = $loaisanphamc3->getList();
                                                            if($ret_loaisanphamc3 != null)
                                                            {
                                                                echo "<ul class='sub_third'>";
                                                                for($l = 0; $l < ($ret_loaisanphamc3 != false ? count($ret_loaisanphamc3) : 0); $l++)
                                                                {
                                                                    echo "<li><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1={$ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1']}&kid2={$ret_loaisanphamc2[$k]['MaLoaiSanPhamCap2']}&kid3={$ret_loaisanphamc3[$l]['MaLoaiSanPhamCap3']}&cont=sanpham'>".$ret_loaisanphamc3[$l]['TenLoaiSanPhamCap3']."</a>";
                                                                    echo "</li>";
                                                                }
                                                                echo "</ul>";
                                                            }
                                                        echo "</li>";
                                                    }
                                                    echo "</ul>";
                                                }
                                        echo "</li>";
                                    }
                                    echo "</ul>";
                                }
                        echo "</li>";
                    }
                    else
                    {
                        echo "<li class='end'><img src='images/icon_title/arrow.png' /><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1=0&kid2=0&kid3=0&cont=sanpham'>".$ret_loaisanpham[$i]['TenLoaiSanPham']."</a>";
                                $loaisanphamc1 = new loaisanphamc1bs();
                                $loaisanphamc1->MaLoaiSanPham = $ret_loaisanpham[$i]['MaLoaiSanPham'];
                                $ret_loaisanphamc1 = $loaisanphamc1->getList();
                                if($ret_loaisanphamc1 != null)
                                {
                                    echo "<ul class='sub_first'>";
                                    for($j = 0; $j < ($ret_loaisanphamc1 != false ? count($ret_loaisanphamc1) : 0); $j++)
                                    {
                                        echo "<li><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1={$ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1']}&kid2=0&kid3=0&cont=sanpham'>".$ret_loaisanphamc1[$j]['TenLoaiSanPhamCap1']."</a>";
                                                $loaisanphamc2 = new loaisanphamc2bs();
                                                $loaisanphamc2->MaLoaiSanPhamCap1 = $ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1'];
                                                $ret_loaisanphamc2 = $loaisanphamc2->getList();
                                                if($ret_loaisanphamc2 != null)
                                                {
                                                    echo "<ul class='sub_second'>";
                                                    for($k = 0; $k < ($ret_loaisanphamc2 != false ? count($ret_loaisanphamc2) : 0); $k++)
                                                    {
                                                        echo "<li><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1={$ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1']}&kid2={$ret_loaisanphamc2[$k]['MaLoaiSanPhamCap2']}&kid3=0&cont=sanpham'>".$ret_loaisanphamc2[$k]['TenLoaiSanPhamCap2']."</a>";
                                                            $loaisanphamc3 = new loaisanphamc3bs();
                                                            $loaisanphamc3->MaLoaiSanPhamCap2 = $ret_loaisanphamc2[$k]['MaLoaiSanPhamCap2'];
                                                            $ret_loaisanphamc3 = $loaisanphamc3->getList();
                                                            if($ret_loaisanphamc3 != null)
                                                            {
                                                                echo "<ul class='sub_third'>";
                                                                for($l = 0; $l < ($ret_loaisanphamc3 != false ? count($ret_loaisanphamc3) : 0); $l++)
                                                                {
                                                                    echo "<li><a href='index.php?root=pro&kid={$ret_loaisanpham[$i]['MaLoaiSanPham']}&kid1={$ret_loaisanphamc1[$j]['MaLoaiSanPhamCap1']}&kid2={$ret_loaisanphamc2[$k]['MaLoaiSanPhamCap2']}&kid3={$ret_loaisanphamc3[$l]['MaLoaiSanPhamCap3']}&cont=sanpham'>".$ret_loaisanphamc3[$l]['TenLoaiSanPhamCap3']."</a>";
                                                                    echo "</li>";
                                                                }
                                                                echo "</ul>";
                                                            }
                                                        echo "</li>";
                                                    }
                                                    echo "</ul>";
                                                }
                                        echo "</li>";
                                    }
                                    echo "</ul>";
                                }
                        echo "</li>";
                    }
				}
            ?>
        </ul>
    </div>
    <div class="end_blocks">&nbsp;</div>
</div>

<script type="text/javascript"> 
function DD_jumpMenu(targ,selObj,restore)
{ 
    var s = selObj.options[selObj.selectedIndex].value; 
    window.open(s); 
    if (restore) selObj.selectedIndex=0; 
} 
</script> 

<div class="mods">
    <div class="title_tab">
        <img src="images/icon_title/weather.png" />
        Thời tiết
    </div>
    <div class="blocks">
        <?php
           //include_once "weather.php";
        ?>
    </div>
    <div class="end_blocks">
        &nbsp;
    </div>
</div>

<div class="mods">
    <div class="title_tab">
        <img src="images/icon_title/rates.png" />
        Giá vàng
    </div>
    <div class="blocks">
        <?php
            //include_once "includes/gadgets/gold.php";
        ?>
    </div>
    <div class="end_blocks_nobg">&nbsp;</div>
</div>

<div class="mods">
    <div class="title_tab">
        <img src="images/icon_title/rates.png" />
        Tỷ giá ngoại tệ
    </div>
    <div class="blocks">
        <?php
            //include_once "includes/gadgets/rate.php";
        ?>
    </div>
    <div class="end_blocks_nobg">&nbsp;</div>
</div>

<div class="mods">
    <div class="title_tab">
        <img src="images/icon_title/access.png" />
        Lượt Truy Cập
    </div>
    <div class="blocks">
        <table style="margin-left: 10px;">
            <tbody>
                <tr>
                    <td>Đang trực tuyến:</td>
                    <td>212</td>
                </tr>
                <tr>
                    <td>Hôm nay:</td>
                    <td>234</td>
                </tr>
                <tr>
                    <td>Hôm qua:</td>
                    <td>432</td>
                </tr>
                <tr>
                    <td>Tất cả:</td>
                    <td>1213123</td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="end_blocks_nobg">&nbsp;</div>
</div>

<div class="mods">
    <div class="title_tab">
        <img src="images/icon_title/links.png" />
        Liên kết web
    </div>
    <div class="blocks">
        <link rel="stylesheet" href="includes/links/select.css" type="text/css" />
        <div class="contact-input">
            <label for="select" class="select">
              <select class="notuniform" name="subject" id="select" onchange="DD_jumpMenu('parent',this,0);">
                    <option value="" selected="selected">--- Liên kết nhanh ---</option>
                <optgroup label="Tin Tức"> 
                    <option value="http://tuoitre.com.vn">Tuổi Trẻ Online</option> 
                    <option value="http://baomoi.com">Báo Mới</option> 
                </optgroup> 
                <optgroup label="Bạn Bè"> 
                    <option value="http://www.dienmay.com">Điện Máy</option>
                </optgroup>
              </select>
            </label>
        </div>
    </div>
    <div class="end_blocks_nobg">&nbsp;</div>
</div>